package com.heima.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@TableName("tb_user")
public class User {
    private String id;
    @ApiModelProperty("人员类型id")
    @NotNull(message = "人员类型不能为空")
    private Integer roleId;
    @NotBlank(message = "人员姓名不能为空")
    @ApiModelProperty("人员姓名")
    private String userName;

    private String loginName;

    private String password;

    private Integer areaId;

    private String secret;

    private String roleCode;

    @ApiModelProperty("移动电话")
    @NotBlank(message = "人员电话不能为空")
    private String mobile;

    private Integer companyId;

    @ApiModelProperty("区域id")
    @NotBlank(message = "区域不能为空")
    private Long regionId;

    @NotBlank(message = "区域名不能为空")
    @ApiModelProperty("区域名")
    private String regionName;

    @ApiModelProperty("人员图片")
    @NotBlank(message = "人员图片不能为空")
    private String image;

    @TableField(exist = false)
    private Role role;

    @TableField(exist = false)
    private Integer statusValue = 0;

}
